<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="basePath" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html>
<html>
<head>
<title>设备能源管理系统(EMS)</title>
<meta charset="UTF-8" />
	<jsp:include page="../common/header.jsp"/>
	<script type="text/javascript" src="${basePath}/resources/js/moment.js"></script>
	<script type="text/javascript" src="${basePath}/resources/js/config/lineConfig.js"></script>
</head>
<body class="easyui-layout">
<jsp:include page="../common/top.jsp"/>
<%-- <img src="${basePath}/up/1482737289839.jpg"/> --%>
<div class="layout-content" data-options="region:'center',border:false">
	<div class="easyui-layout togray mt15 layout-content4">
	    <div data-options="region:'center',title:'生产线配置',split:true,collapsible:true,iconCls:'icon-p1'" >
	    	<div id="tb" style="margin:10px 0 0;">
				<a href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="obj.addWS();">添加车间</a>
				<a href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="obj.addLine();">添加生产线</a>
				<a href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="obj.edit();">修改</a>
				<a href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="obj.deletes();">删除</a>
				<a href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="obj.refresh();">刷新</a>
			</div>
			<table id="line_data"></table>
	    </div>   
	    <div data-options="region:'south',title:'设备',split:true,collapsible:false,iconCls:'icon-p1'" class="ems-main-south3">
	    	<div id="tb_sb" style="margin:0;padding:0;">
				<a href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="obj.addEquip();">添加设备</a>
				<a href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="obj.editEquip();">修改</a>
				<a href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="obj.deleteEquip();">删除</a>
			</div>
			<table id="equip_data"></table>
	    </div>
    </div>
</div>

<!-- 添加车间-->
<div id="addWsWin">
	<form id="addWsform" method="post" >
		<input type="hidden" name="isLine" id='addisLine'/>
	 	<div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">名称：</label> 
	        <div class="col-pd-8"><input name="name" class="textbox easyui-validatebox" style="width:200px;" data-options="required:'true'" /></div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">负责人：</label> 
	        <div class="col-pd-8"><input name="leader" class="textbox easyui-validatebox" style="width:200px;"  /></div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">备注：</label> 
	        <div class="col-pd-8"><textarea name="remark" class="easyui-validatebox" style="width:200px;height:100px"  ></textarea></div>
	    </div>
	</form>
</div>
<!-- 编辑车间-->
<div id="editWsWin">
	<form id="editWsform" method="post" >
		<input type="hidden" name="id" />
		<input type="hidden" name="isLine" />
	 	<div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">名称：</label> 
	        <div class="col-pd-8"><input name="name" class="textbox easyui-validatebox" style="width:200px;" data-options="required:'true'" /></div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">负责人：</label> 
	        <div class="col-pd-8"><input name="leader" class="textbox easyui-validatebox" style="width:200px;"  /></div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">备注：</label> 
	        <div class="col-pd-8"><textarea name="remark" class="easyui-validatebox" style="width:200px;height:100px"  ></textarea></div>
	    </div>
	</form>
</div>

<!-- 添加生产线-->
<div id="addLineWin">
	<form id="addLineform" method="post" >
		<input type="hidden" name="isLine" id='addisLine'/>
		<input type="hidden" name="fatherId" id="addfatherId"/>
		<div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">编号：</label> 
	        <div class="col-pd-8"><input name="linesNo" class="textbox easyui-validatebox" style="width:200px;" data-options="required:'true'" /></div>
	    </div>
	 	<div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">名称：</label> 
	        <div class="col-pd-8"><input name="name" class="textbox easyui-validatebox" style="width:200px;" data-options="required:'true'" /></div>
	    </div>
		<div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">是否采集：</label> 
	        <div class="col-pd-8">
	        	<select class="easyui-combobox" name="isCollect" style="width:200px;" data-options="panelHeight:90,editable:false">
	        		<option value=" ">请选择</option>    
				    <option value="Y">已采集</option>   
				    <option value="N">未采集</option>   
				  </select>
	        </div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">负责人：</label> 
	        <div class="col-pd-8"><input name="leader" class="textbox easyui-validatebox" style="width:200px;"  /></div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">备注：</label> 
	        <div class="col-pd-8"><textarea name="remark" class="easyui-validatebox" style="width:200px;height:100px"  ></textarea></div>
	    </div>
	</form>
</div>
<!-- 修改生产线-->
<div id="editLineWin">
	<form id="editLineform" method="post">
		<input type="hidden" name="id" id='id'/>
		<input type="hidden" name="isLine" id='isLine'/>
		<input type="hidden" name="fatherId" id="fatherId"/>
		<div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">编号：</label> 
	        <div class="col-pd-8"><input name="linesNo" class="textbox easyui-validatebox" style="width:200px;" data-options="required:'true'" /></div>
	    </div>
		<div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">名称：</label> 
	        <div class="col-pd-8"><input name="name" class="textbox easyui-validatebox" style="width:200px;" data-options="required:'true'" /></div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">是否采集：</label> 
	        <div class="col-pd-8">
	        	<select class="easyui-combobox" name="isCollect" style="width:200px;" data-options="panelHeight:90,editable:false">
	        		<option value=" ">请选择</option>    
				    <option value="Y">已采集</option>   
				    <option value="N">未采集</option>   
				  </select>
	        </div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">负责人：</label> 
	        <div class="col-pd-8"><input name="leader" class="textbox easyui-validatebox" style="width:200px;"  /></div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">备注：</label> 
	        <div class="col-pd-8"><textarea name="remark" class="easyui-validatebox" style="width:200px;height:100px"  ></textarea></div>
	    </div>
	</form>
</div>

<!-- 添加设备-->
<div id="addEquipWin">
	<form id="addEquipform" method="post" enctype="multipart/form-data" >
		<input type="hidden" name="lineId" id='lineId'/>
<!-- 		<input type="hidden" name="equMoldId" id="equMoldId"/> -->
	 	<div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">设备名称：</label> 
	        <div class="col-pd-8"><input name="equName" class="textbox easyui-validatebox" style="width:200px;" data-options="required:'true'" /></div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">设备编号：</label> 
	        <div class="col-pd-8"><input name="equNo" class="textbox easyui-validatebox" style="width:200px;" data-options="required:'true'" /></div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">设备类型：</label> 
	        <div class="col-pd-8"><input name="equMoldId" id="cc" style="width:200px;"/></div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">额定功率：</label> 
	        <div class="col-pd-8"><input id="addratedPower" name="ratedPower" class="textbox easyui-validatebox" style="width:200px;"  /></div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">生产厂家：</label> 
	        <div class="col-pd-8"><input id="addsupplier" name="supplier" class="textbox easyui-validatebox" style="width:200px;"  /></div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">使用寿命：</label> 
	        <div class="col-pd-8"><input id="addlife" name="life" class="textbox easyui-validatebox" style="width:200px;" /></div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">是否采集：</label> 
	        <div class="col-pd-8">
	        	<select class="easyui-combobox" name="isCollect" style="width:200px;" data-options="panelHeight:90,editable:false">
	        		<option value=" ">请选择</option>    
				    <option value="Y">已采集</option>   
				    <option value="N">未采集</option>   
				  </select>
	        </div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">选择图片：</label> 
	        <div class="col-pd-8">
	        	<input  class="easyui-filebox" id="file" name="file" data-options="buttonText: '上传'" style="width:200px;">
	        </div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">备注：</label> 
	        <div class="col-pd-8"><textarea name="remark" class="easyui-validatebox" style="width:200px;height:100px" ></textarea></div>
	    </div>
	</form>
</div>

<!-- 编辑设备-->
<div id="editEquipWin">
	<form id="editEquipform" method="post">
		<input type="hidden" name="id" id='id'/>
		<input type="hidden" name="lineId" id='lineId'/>
	 	<div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">设备名称：</label> 
	        <div class="col-pd-8"><input name="equName" class="textbox easyui-validatebox" style="width:200px;" data-options="required:'true'" /></div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">设备编号：</label> 
	        <div class="col-pd-8"><input name="equNo" class="textbox easyui-validatebox" style="width:200px;" data-options="required:'true'" /></div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">设备类型：</label> 
	        <div class="col-pd-8"><input name="equMoldId" id="cc1" style="width:200px;"/></div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">额定功率：</label> 
	        <div class="col-pd-8"><input id="editratedPower" name="ratedPower" class="textbox easyui-validatebox" style="width:200px;" data-options="required:'true'" /></div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">生产厂家：</label> 
	        <div class="col-pd-8"><input id="editsupplier" name="supplier" class="textbox easyui-validatebox" style="width:200px;" data-options="required:'true'" /></div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">使用寿命：</label> 
	        <div class="col-pd-8"><input id="editlife" name="life" class="textbox easyui-validatebox" style="width:200px;" data-options="required:'true'" /></div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">是否采集：</label> 
	        <div class="col-pd-8">
	        	<select class="easyui-combobox" name="isCollect" style="width:200px;" data-options="panelHeight:90,editable:false">
	        		<option value=" ">请选择</option>    
				    <option value="Y">已采集</option>   
				    <option value="N">未采集</option>   
				  </select>
	        </div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">备注：</label> 
	        <div class="col-pd-8"><textarea name="remark" class="easyui-validatebox" style="width:200px;height:100px"  ></textarea></div>
	    </div>
	</form>
</div>

<!-- 修改设备图片-->
<div id="editPhotoWin">
	<form id="editPhotoform" method="post" enctype="multipart/form-data" >
		<input type="hidden" name="id" />
	    <div class="col-pd-12 form-item">
	    	<label class="col-pd-3">图片：</label> 
	       	<div class="col-pd-8"><img id='editimg'  style="width:200px;height:100px"/></div>
	    </div>
	    <div class="col-pd-12 form-item"> 
	        <label class="col-pd-3">更改图片：</label> 
	        <div class="col-pd-8">
	        	<input  class="easyui-filebox" id="file" name="file" data-options="buttonText: '上传'" style="width:200px;">
	        </div>
	    </div>
	</form>
</div>
</body>
</html>